/**
 * @Title: ForumIndexController.java
 * @Package com.zll.ccp.controller.forum
 * @author zhanglinlu
 * @date 2019年5月30日 下午3:35:11
 */
package com.zll.ccp.controller.forum;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zll.ccp.service.forum.IForumService;

/**
 * @ClassName: ForumIndexController
 * @Description: 论坛主页controller
 * @author zhanglinlu
 * @date 2019年5月30日 下午3:35:11
 * 
 */
@Controller
public class ForumIndexController {

    @Autowired
    private IForumService forumService;

    /**
     * @Title: index
     * @Description: 进入论坛主页
     * @return
     */
    @RequestMapping("/forum")
    public String index() {
        return "forum/forumindex";
    }

    /**
     * @Title: getHotthemes
     * @Description: 获取最热主题
     * @return
     */
    @GetMapping("/hotthemes")
    @ResponseBody
    public Object getHotthemes() {
        return forumService.getHotTheme();
    }

    /**
     * @Title: getHotthemes
     * @Description: 获取最新主题
     * @return
     */
    @GetMapping("/newthemes")
    @ResponseBody
    public Object getNewthemes() {
        return forumService.getNewTheme();
    }

    /**
     * @Title: getHotmains
     * @Description: 获取最热主贴
     * @return
     */
    @GetMapping("/hotmains")
    @ResponseBody
    public Object getHotMains() {
        return forumService.getHotMain();
    }

    /**
     * @Title: getHotmains
     * @Description: 获取最新主贴
     * @return
     */
    @GetMapping("/newtmains")
    @ResponseBody
    public Object getNewMains() {
        return forumService.getNewMain();
    }

}
